#include <REGX52.H>
#include "MatrixLED.h"
#include "Delay.h"

// 用code修饰表示放入flash中，防止占用ram内存
static const unsigned char code bitmap_bytes[] = {
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x7F,0x08,0x08,0x08,0x7F,0x00,0x00,0x0E,
    0x15,0x15,0x15,0x0C,0x00,0x00,0x7F,0x01,
    0x02,0x00,0x00,0x7F,0x01,0x02,0x00,0x00,
    0x0E,0x11,0x11,0x0E,0x00,0x00,0x7D,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
};


void main()
{
    unsigned char i=0,OffSet=0,Count=0;
    MatrixLED_Init();
    while(1)
    {
        for(i=0;i<8;i++)
        {
            MatrixLED_ShowColumn(i, bitmap_bytes[i+OffSet]);
        }
        if(++Count>10)
        {
            Count=0;
            if (++OffSet>40) OffSet=0;
        }
    }
}
